home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Printing / PrintBatch.h < prev    next >
Text File  |  2000-06-23  |  673b  |  42 lines

  1. // PrintBatch.h
  2.  
  3. #ifndef PrintBatch_h
  4. #define PrintBatch_h
  5.  
  6. #ifndef Assert_h
  7. #include "Assert.h"
  8. #endif
  9.  
  10. #include <Printing.h>
  11.  
  12. class PrintJob;
  13.  
  14. class PrintBatch
  15.   {
  16.     private:
  17.         const PrintJob& job;
  18.         TPrPort port;
  19.         char buffer[522];
  20.         bool started;
  21.     
  22.         static bool batchExists;
  23.         
  24.         // not implemented:
  25.             PrintBatch( const PrintBatch& );
  26.             void operator=( const PrintBatch& );
  27.     
  28.     public:
  29.         explicit PrintBatch( const PrintJob& );
  30.         ~PrintBatch();
  31.         
  32.         void Start();
  33.         void End();
  34.         
  35.         void Split()                            { End(); Start(); }
  36.         
  37.         TPrPort& Port()                         { Assert( started ); return port; }
  38.         const TPrPort& Port() const          { Assert( started ); return port; }
  39.   };
  40.  
  41. #endif
  42.